<template>
  <div class="app-container">
    <!-- 页面标题 -->
    <div class="page-header-container">
      <div class="page-header-title">
        <h3>RAG知识库</h3>
        <p class="page-subtitle">幼儿园安全文档智能管理系统</p>
      </div>
      <div class="page-header-action">
        <el-button type="primary" icon="el-icon-plus" @click="handleUpload" class="upload-btn">
          上传文档
        </el-button>
        <el-button type="default" icon="el-icon-refresh" @click="refreshData" class="refresh-btn">
          刷新数据
        </el-button>
      </div>
    </div>

    <!-- 统计卡片区域 -->
    <div class="statistics-cards">
      <div class="stat-card" @mouseenter="cardHover = true" @mouseleave="cardHover = false">
        <div class="stat-icon el-icon-document"></div>
        <div class="stat-content">
          <div class="stat-title">总文档数</div>
          <div class="stat-value">448</div>
          <div class="stat-change" :class="{ positive: true }">+1% 较上月</div>
        </div>
      </div>
      <div class="stat-card purple" @mouseenter="cardHover = true" @mouseleave="cardHover = false">
        <div class="stat-icon el-icon-files"></div>
        <div class="stat-content">
          <div class="stat-title">向量数量</div>
          <div class="stat-value">15.6k</div>
          <div class="stat-change" :class="{ positive: true }">+8% 较上月</div>
        </div>
      </div>
      <div class="stat-card green" @mouseenter="cardHover = true" @mouseleave="cardHover = false">
        <div class="stat-icon el-icon-plus"></div>
        <div class="stat-content">
          <div class="stat-title">本月新增</div>
          <div class="stat-value">36</div>
          <div class="stat-change" :class="{ negative: true }">-4% 较上月</div>
        </div>
      </div>
      <div class="stat-card yellow" @mouseenter="cardHover = true" @mouseleave="cardHover = false">
        <div class="stat-icon el-icon-check"></div>
        <div class="stat-content">
          <div class="stat-title">平均匹配度</div>
          <div class="stat-value">97.3%</div>
          <div class="stat-change" :class="{ positive: true }">+2.1% 较上月</div>
        </div>
      </div>
    </div>

    <!-- 搜索和表格区域 -->
    <div class="search-table-container">
      <div class="search-bar">
        <div class="search-header">
          <div class="search-label">知识库文档</div>
          <div class="search-tags">
            <el-tag size="small" type="info" effect="plain" v-for="tag in activeTags" :key="tag" closable @close="removeTag(tag)">
              {{ tag }}
            </el-tag>
          </div>
        </div>
        <div class="search-inputs">
          <el-input
            v-model="searchQuery"
            placeholder="搜索文档名称或内容..."
            prefix-icon="el-icon-search"
            size="small"
            @keyup.enter="handleSearch"
            class="main-search"
          />
          <el-select v-model="fileTypeFilter" placeholder="筛选类型" size="small" class="type-filter">
            <el-option label="全部类型" value=""></el-option>
            <el-option label="PDF文档" value="PDF文档"></el-option>
            <el-option label="Word文档" value="Word文档"></el-option>
            <el-option label="Excel文档" value="Excel文档"></el-option>
          </el-select>
          <el-button type="primary" size="small" icon="el-icon-search" @click="handleSearch">
            搜索
          </el-button>
          <el-button type="default" size="small" icon="el-icon-delete" @click="resetSearch">
            重置
          </el-button>
        </div>
      </div>

      <!-- 文档表格 -->
      <el-table 
        :data="paginatedDocuments" 
        style="width: 100%"
        stripe
        border
        v-loading="loading"
        :row-class-name="tableRowClassName"
      >
        <el-table-column type="selection" width="55" />
        <el-table-column prop="id" label="ID" width="80" align="center" />
        <el-table-column prop="name" label="文档名称" min-width="200">
          <template #default="scope">
            <div class="document-name" @click="viewDocument(scope.row)">
              <el-tooltip :content="scope.row.name" placement="top" :disabled="scope.row.name.length < 20">
                <div class="document-info">
                  <i :class="getDocumentIcon(scope.row.type)"></i>
                  <span class="document-text">{{ scope.row.name }}</span>
                </div>
              </el-tooltip>
              <el-tag 
                size="mini" 
                v-if="scope.row.status === '已处理'" 
                type="success" 
                effect="plain"
              >
                已处理
              </el-tag>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="type" label="类型" width="120" align="center">
          <template #default="scope">
            <el-tag size="small" :type="getTypeTagType(scope.row.type)" effect="plain">
              {{ scope.row.type }}
            </el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="size" label="大小" width="100" align="center" />
        <el-table-column prop="uploadTime" label="上传时间" width="150" align="center" sortable>
          <template #default="scope">
            <div>{{ formatDate(scope.row.uploadTime) }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="pages" label="页数" width="80" align="center" />
        <el-table-column label="操作" width="150" fixed="right" align="center">
          <template #default="scope">
            <div class="action-buttons">
              <el-tooltip content="查看" placement="top">
                <el-button type="text" size="small" @click="viewDocument(scope.row)">
                  <template #icon><Document /></template>
                </el-button>
              </el-tooltip>
              <el-tooltip content="编辑" placement="top">
                <el-button type="text" size="small" @click="editDocument(scope.row)">
                  <template #icon><EditPen /></template>
                </el-button>
              </el-tooltip>
              <el-tooltip content="删除" placement="top">
                <el-button type="text" size="small" danger @click="deleteDocument(scope.row)">
                  <template #icon><Delete /></template>
                </el-button>
              </el-tooltip>
            </div>
          </template>
        </el-table-column>
      </el-table>

      <!-- 分页组件 -->
      <div class="pagination-container" v-if="filteredDocuments.length > 0">
        <div class="pagination-info">
          显示 {{ startIndex }} 到 {{ endIndex }}，共 {{ filteredDocuments.length }} 条记录
        </div>
        <el-pagination
          v-model:current-page="currentPage"
          v-model:page-size="pageSize"
          :page-sizes="[5, 10, 30, 50]"
          layout="total, sizes, prev, pager, next, jumper"
          :total="448"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          class="pagination"
        />
      </div>
      
      <!-- 空状态 -->
      <div class="empty-state" v-else>
        <el-empty description="暂无匹配的文档" :image-size="120">
          <template #description>
            <span>没有找到符合条件的文档</span>
          </template>
          <el-button type="primary" @click="resetSearch">重置搜索</el-button>
        </el-empty>
      </div>
    </div>
    
    <!-- 上传对话框 -->
    <el-dialog
      v-model="dialogVisible"
      title="上传文档"
      width="600px"
      :close-on-click-modal="false"
    >
      <div class="upload-dialog-content">
        <el-upload
          class="upload-demo"
          drag
          action="#"
          :limit="1"
          :auto-upload="false"
          :on-change="handleFileChange"
        >
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
          <div class="el-upload__tip" slot="tip">
            支持 PDF、Word、Excel 格式，单个文件不超过 50MB
          </div>
        </el-upload>
        
        <div class="upload-form">
          <el-form label-width="80px">
            <el-form-item label="文档名称">
              <el-input v-model="uploadForm.name" placeholder="请输入文档名称"></el-input>
            </el-form-item>
            <el-form-item label="文档类型">
              <el-select v-model="uploadForm.type" placeholder="请选择文档类型">
                <el-option label="PDF文档" value="PDF文档"></el-option>
                <el-option label="Word文档" value="Word文档"></el-option>
                <el-option label="Excel文档" value="Excel文档"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="文档标签">
              <el-select v-model="uploadForm.tags" multiple placeholder="请选择标签">
                <el-option label="安全管理" value="安全管理"></el-option>
                <el-option label="应急处理" value="应急处理"></el-option>
                <el-option label="特殊体质" value="特殊体质"></el-option>
                <el-option label="户外活动" value="户外活动"></el-option>
                <el-option label="案例分析" value="案例分析"></el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </div>
      </div>
      
      <template #footer>
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="submitUpload">确认上传</el-button>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
import { Document, EditPen, Delete } from '@element-plus/icons-vue'
import { ref, computed } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'

// 响应式数据
const searchQuery = ref('')
const currentPage = ref(1)
const pageSize = ref(10)
const loading = ref(false)
const cardHover = ref(false)
const fileTypeFilter = ref('')
const activeTags = ref([])
const dialogVisible = ref(false)
const selectedFile = ref(null)
const uploadForm = ref({
  name: '',
  type: '',
  tags: []
})

// 幼儿园安全相关模拟文档数据
const documentList = ref([
  {
    id: 1,
    name: '户外游戏磕碰纠纷处理沟通话术.docx',
    type: 'Word文档',
    size: '1.2 MB',
    uploadTime: '2025-11-09',
    pages: 22,
    status: '已处理',
    tags: ['应急处理', '沟通话术']
  },
  {
    id: 2,
    name: '幼儿园户外活动安全风险防控案例分析.pdf',
    type: 'PDF文档',
    size: '3.7 MB',
    uploadTime: '2025-11-03',
    pages: 56,
    status: '已处理',
    tags: ['户外活动', '安全管理', '案例分析']
  },
  {
    id: 3,
    name: '幼儿园园内意外安全事件案例复盘报告.pdf',
    type: 'PDF文档',
    size: '4.5 MB',
    uploadTime: '2025-10-25',
    pages: 72,
    status: '已处理',
    tags: ['安全管理', '案例分析']
  },
  {
    id: 4,
    name: '本园特殊体质学生（心脏病/癫痫）管理案例.xlsx',
    type: 'Excel文档',
    size: '2.3 MB',
    uploadTime: '2025-10-18',
    pages: 30,
    status: '已处理',
    tags: ['特殊体质', '案例分析']
  },
  {
    id: 5,
    name: '幼儿园安全案例（防走失/防磕碰）培训材料.pdf',
    type: 'PDF文档',
    size: '3.9 MB',
    uploadTime: '2025-10-12',
    pages: 60,
    status: '已处理',
    tags: ['安全管理', '培训材料']
  },
  {
    id: 6,
    name: '幼儿园户外磕碰应急处理流程.docx',
    type: 'Word文档',
    size: '2.1 MB',
    uploadTime: '2025-10-05',
    pages: 32,
    status: '已处理',
    tags: ['户外活动', '应急处理']
  },
  {
    id: 7,
    name: '本园体质特殊学生（过敏/哮喘）案例台账.xlsx',
    type: 'Excel文档',
    size: '1.8 MB',
    uploadTime: '2025-09-28',
    pages: 24,
    status: '已处理',
    tags: ['特殊体质', '案例分析']
  },
  {
    id: 8,
    name: '幼儿园常见安全案例汇编.pdf',
    type: 'PDF文档',
    size: '4.2 MB',
    uploadTime: '2025-09-15',
    pages: 68,
    status: '已处理',
    tags: ['安全管理', '案例分析']
  },
  {
    id: 9,
    name: '特殊体质幼儿日常活动适配案例汇总.xlsx',
    type: 'Excel文档',
    size: '2.7 MB',
    uploadTime: '2025-09-12',
    pages: 36,
    status: '已处理',
    tags: ['特殊体质', '案例分析']
  },
  {
    id: 10,
    name: '幼儿户外磕碰伤口处理实操指南.docx',
    type: 'Word文档',
    size: '1.5 MB',
    uploadTime: '2025-09-08',
    pages: 28,
    status: '已处理',
    tags: ['户外活动', '应急处理']
  }
])

// 计算属性：过滤后的文档列表
const filteredDocuments = computed(() => {
  let filtered = documentList.value
  
  // 按搜索关键词过滤
  if (searchQuery.value) {
    const query = searchQuery.value.toLowerCase()
    filtered = filtered.filter(doc => 
      doc.name.toLowerCase().includes(query) || 
      (doc.tags && doc.tags.some(tag => tag.toLowerCase().includes(query)))
    )
  }
  
  // 按文件类型过滤
  if (fileTypeFilter.value) {
    filtered = filtered.filter(doc => doc.type === fileTypeFilter.value)
  }
  
  // 按标签过滤
  if (activeTags.value.length > 0) {
    filtered = filtered.filter(doc => 
      doc.tags && activeTags.value.every(tag => doc.tags.includes(tag))
    )
  }
  
  return filtered
})

// 计算属性：分页后的文档列表
const paginatedDocuments = computed(() => {
  const start = (currentPage.value - 1) * pageSize.value
  const end = start + pageSize.value
  return filteredDocuments.value.slice(start, end)
})

// 计算属性：分页信息
const startIndex = computed(() => {
  return filteredDocuments.value.length > 0 ? (currentPage.value - 1) * pageSize.value + 1 : 0
})

const endIndex = computed(() => {
  return Math.min(currentPage.value * pageSize.value, filteredDocuments.value.length)
})

// 根据文档类型返回对应的图标
const getDocumentIcon = (type) => {
  if (type.includes('PDF')) return 'el-icon-document bg-red'
  if (type.includes('Word')) return 'el-icon-document bg-blue'
  if (type.includes('Excel')) return 'el-icon-document bg-green'
  return 'el-icon-document bg-gray'
}

// 获取文档类型对应的标签类型
const getTypeTagType = (type) => {
  if (type.includes('PDF')) return 'danger'
  if (type.includes('Word')) return 'primary'
  if (type.includes('Excel')) return 'success'
  return 'info'
}

// 格式化日期
const formatDate = (dateStr) => {
  if (!dateStr) return ''
  const date = new Date(dateStr)
  return date.toLocaleDateString('zh-CN', {
    year: 'numeric',
    month: '2-digit',
    day: '2-digit'
  })
}

// 表格行样式
const tableRowClassName = ({ row, rowIndex }) => {
  return rowIndex % 2 === 0 ? 'table-row-even' : 'table-row-odd'
}

// 处理搜索
const handleSearch = () => {
  currentPage.value = 1 // 搜索时重置到第一页
}

// 重置搜索
const resetSearch = () => {
  searchQuery.value = ''
  fileTypeFilter.value = ''
  activeTags.value = []
  currentPage.value = 1
}

// 处理分页大小变化
const handleSizeChange = (size) => {
  pageSize.value = size
  currentPage.value = 1
}

// 处理当前页变化
const handleCurrentChange = (current) => {
  currentPage.value = current
}

// 查看文档
const viewDocument = (row) => {
  ElMessage.info(`查看文档：${row.name}`)
  // 实际项目中这里会打开文档预览
}

// 编辑文档
const editDocument = (row) => {
  ElMessage.info(`编辑文档：${row.name}`)
  // 实际项目中这里会打开编辑表单
}

// 删除文档
const deleteDocument = (row) => {
  ElMessageBox.confirm(
    `确定要删除文档「${row.name}」吗？`,
    '删除确认',
    {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: 'warning'
    }
  ).then(() => {
    // 实际项目中这里会调用删除API
    ElMessage.success('文档删除成功')
  }).catch(() => {
    // 用户取消删除
  })
}

// 刷新数据
const refreshData = () => {
  loading.value = true
  // 模拟加载延迟
  setTimeout(() => {
    loading.value = false
    ElMessage.success('数据刷新成功')
  }, 500)
}

// 处理上传
const handleUpload = () => {
  dialogVisible.value = true
  resetUploadForm()
}

// 重置上传表单
const resetUploadForm = () => {
  uploadForm.value = {
    name: '',
    type: '',
    tags: []
  }
  selectedFile.value = null
}

// 处理文件选择变化
const handleFileChange = (file) => {
  selectedFile.value = file.raw
  // 从文件名推断文档类型
  const fileName = file.name
  if (fileName.endsWith('.pdf')) {
    uploadForm.value.type = 'PDF文档'
  } else if (fileName.endsWith('.docx') || fileName.endsWith('.doc')) {
    uploadForm.value.type = 'Word文档'
  } else if (fileName.endsWith('.xlsx') || fileName.endsWith('.xls')) {
    uploadForm.value.type = 'Excel文档'
  }
  // 默认使用文件名作为文档名称
  uploadForm.value.name = fileName
}

// 提交上传
const submitUpload = () => {
  if (!selectedFile.value) {
    ElMessage.warning('请选择要上传的文件')
    return
  }
  
  if (!uploadForm.value.name) {
    ElMessage.warning('请输入文档名称')
    return
  }
  
  if (!uploadForm.value.type) {
    ElMessage.warning('请选择文档类型')
    return
  }
  
  loading.value = true
  // 模拟上传过程
  setTimeout(() => {
    loading.value = false
    dialogVisible.value = false
    ElMessage.success('文档上传成功')
    // 实际项目中这里会调用上传API并刷新数据
  }, 1500)
}

// 移除标签
const removeTag = (tag) => {
  const index = activeTags.value.indexOf(tag)
  if (index !== -1) {
    activeTags.value.splice(index, 1)
  }
}
</script>

<style scoped>
.app-container {
  padding: 20px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

/* 页面标题样式 */
.page-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebeef5;
}

.page-header-title h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
}

.page-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  font-weight: normal;
}

.upload-btn {
  margin-right: 12px;
  transition: all 0.3s ease;
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.refresh-btn {
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  transform: translateY(-1px);
}

/* 统计卡片样式 */
.statistics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #409eff;
}

.stat-card.purple::before {
  background: #909399;
}

.stat-card.green::before {
  background: #67c23a;
}

.stat-card.yellow::before {
  background: #e6a23c;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  border-radius: 8px;
  margin-right: 16px;
  background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.stat-card.purple .stat-icon {
  background: linear-gradient(135deg, #909399 0%, #a6a9ad 100%);
  box-shadow: 0 4px 12px rgba(144, 147, 153, 0.3);
}

.stat-card.green .stat-icon {
  background: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
  box-shadow: 0 4px 12px rgba(103, 194, 58, 0.3);
}

.stat-card.yellow .stat-icon {
  background: linear-gradient(135deg, #e6a23c 0%, #ebb563 100%);
  box-shadow: 0 4px 12px rgba(230, 162, 60, 0.3);
}

.stat-content {
  flex: 1;
}

.stat-title {
  font-size: 14px;
  color: #606266;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #303133;
  margin-bottom: 4px;
  line-height: 1.2;
}

.stat-change {
  font-size: 12px;
  font-weight: 500;
}

.stat-change.positive {
  color: #67c23a;
}

.stat-change.negative {
  color: #f56c6c;
}

/* 搜索和表格区域样式 */
.search-table-container {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
}

.search-bar {
  margin-bottom: 24px;
}

.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.search-label {
  font-weight: 600;
  font-size: 16px;
  color: #303133;
}

.search-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-inputs {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.main-search {
  min-width: 300px;
  flex: 1;
}

.type-filter {
  width: 150px;
}

/* 文档名称样式 */
.document-name {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.document-name:hover {
  color: #409eff;
}

.document-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.document-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* 文档图标样式 */
.el-icon-document {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: white;
  font-size: 16px;
}

.bg-red {
  background-color: #ff4d4f;
}

.bg-blue {
  background-color: #1890ff;
}

.bg-green {
  background-color: #52c41a;
}

.bg-gray {
  background-color: #909399;
}

/* 表格样式 */
:deep(.el-table) {
  border-radius: 8px;
  overflow: hidden;
}

:deep(.el-table__header-wrapper th) {
  background-color: #f8fafc;
  font-weight: 600;
  color: #303133;
  border-bottom: 1px solid #ebeef5;
}

:deep(.el-table__body-wrapper tr:hover > td) {
  background-color: #f5f7fa !important;
}

.table-row-even {
  background-color: #fafafa;
}

/* 操作按钮样式 */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.action-buttons .el-button {
  padding: 0 8px;
  transition: all 0.2s ease;
}

.action-buttons .el-button:hover {
  transform: translateY(-1px);
}

/* 分页样式 */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ebeef5;
}

.pagination-info {
  font-size: 14px;
  color: #606266;
  font-weight: 500;
}

.pagination {
  display: flex;
  justify-content: flex-end;
}

/* 空状态样式 */
.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  color: #909399;
}

/* 上传对话框样式 */
.upload-dialog-content {
  padding: 10px 0;
}

.upload-demo {
  margin-bottom: 20px;
  border: 2px dashed #dcdfe6;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.upload-demo:hover {
  border-color: #409eff;
}

.upload-form {
  margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .statistics-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 12px;
  }
  
  .page-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .statistics-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .search-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .main-search,
  .type-filter {
    width: 100%;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  
  .pagination-info {
    text-align: center;
  }
}

/* 加载动画增强 */
:deep(.el-loading-spinner .path) {
  stroke: #409eff;
}

:deep(.el-loading-spinner .el-loading-text) {
  color: #409eff;
}

/* 标签样式增强 */
:deep(.el-tag) {
  transition: all 0.2s ease;
}

:deep(.el-tag:hover) {
  transform: translateY(-1px);
}

/* 按钮组样式 */
:deep(.el-button-group .el-button:not(:first-child):not(:last-child)) {
  border-radius: 0;
}

:deep(.el-button-group .el-button:first-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

:deep(.el-button-group .el-button:last-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
</style>
